//
//  MyEvaCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/12/18.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "MyEvaCell.h"

@implementation MyEvaCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        
        [self.bgView pp_clipCorners:UIRectCornerAllCorners radius:6];
        
    });
}

- (void)fillWithModel:(CommunityInteractionModel *)model {
    
    //图标赋值
    switch (model.type) {
        case 1:{
            [self.tagIcon setImage:[UIImage imageNamed:@"hd_post"]];
            self.postNameLab.text = model.postTitle;//帖子话题名称赋值
        } break;
        case 2:{
            [self.tagIcon setImage:[UIImage imageNamed:@"hd_topic"]];
            self.postNameLab.text = model.postContent;//帖子话题名称赋值
        } break;
        case 3:{
            [self.tagIcon setImage:[UIImage imageNamed:@"hd_qa"]];
            self.postNameLab.text = model.postTitle;//帖子话题名称赋值
        } break;
        default:
            break;
    }
        
    //level为3的时候为60
    if ([model.level isEqualToString:@"2"]) {
        self.evaContentLab.text = @"";
    }
    
    //level为3的时候为60
    if ([model.level isEqualToString:@"3"]) {
        self.evaContentLab.text =[NSString stringWithFormat:@"我：%@",model.commentContent];
    }
    
    if ([model.level isEqualToString:@"4"]) {
        self.evaContentLab.text = [NSString stringWithFormat:@"我：%@",model.replyContent];
    }
    
    //我回复的内容
}


@end
